#!/usr/bin/env python

from ConfigParser import NoOptionError, RawConfigParser
import sys


if __name__ == '__main__':
    if len(sys.argv) == 3:
        section = sys.argv[1]
        option = sys.argv[2]
        config = RawConfigParser()
        config.read('config.ini')
        try:
            print config.get(section, option)
        except NoOptionError:
            print ''
    elif len(sys.argv) == 1:
        config = RawConfigParser()
        config.read('config.ini')
        options = config.options('default')
        options = [o.upper() for o in options if o != 'hosts']
        options = ' '.join(options)
        print options
    else:
        print ''
